Repository navigation
Conversation
Dialogs focused Cancel on open, so pressing Enter cancelled even though Confirm is the highlighted action. Popups now focus the AlertDialogAction or DialogAction when they open, so Enter and Space confirm and Tab reaches Cancel, with native button semantics. Destructive actions aren't marked, so those dialogs keep focus on Cancel. Touch opens still focus the popup. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This PR changes keyboard focus and Enter/Space activation in existing update, installation, retry, and import dialogs, including workflows that trigger substantial actions. The shared dialog primitives and several production call sites are changed, so the product-default interaction changes warrant review. You can add or adjust custom eligibility rules. Learn more. |
Dismissing prior approval to re-evaluate 894463f
|
Warning Review limit reachedOnly developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing. Next included review available in 3 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
ConfirmDialogHost serves every requestConfirmDialog and dialogs.confirm caller, so focusing Confirm there also made Enter approve MCP tool requests, roll back checkpoints and sign out providers. The host now keeps Cancel focused unless the caller passes initialFocus: "confirm", and only the desktop and server update prompts do. DialogAction now rejects destructive Button variants at compile time instead of matching the variant name, which missed ghost-destructive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dismissing prior approval to re-evaluate 6f46e56
|
Re CodeRabbit's security note: good catch. |
|
@coderabbitai run pre-merge checks |
✅ Actions performedRunning Pre-merge checks. Results will be posted in the summary comment once complete. |
|
Taking over this one. I’ll rebuild on current main, trim the tests to meaningful focus behavior, and push to this branch while keeping generic and destructive confirmations Cancel-first. |
# Conflicts: # apps/web/src/components/ServerUpdateAction.browser.test.tsx
Selected update and install confirmation dialogs focus Cancel even though the primary action is visually emphasized. Pressing Enter therefore cancels. This change lets those prompts opt into primary-action focus while keeping generic and destructive confirmations Cancel-first.
A shared DialogAction marker selects the enabled primary button on popup open. Explicit caller focus wins, caller refs remain composed, and touch opening retains popup focus. Desktop update prompts in Settings, current and legacy sidebars, and remote single/batch update actions opt in. Relay install and browser-import quit/retry screens use the same marker. The broad Update everything dialog keeps its existing behavior.
Based on @rgrvlsk’s original contribution. Contributor history is preserved; main was merged and the implementation rebuilt against current primitives. The rebuild fixes caller refs overriding the internal focus ref and removes redundant comments and runtime variant bookkeeping.
Verification for rebuilt head 0c37cce149:
The screenshots use the same synthetic app data, 1280×800 viewport, dialog text, and Liberation Sans fallback font. Baseline web focus code matches main ab6be13d43; head is 0c37cce149. The live coordinator was invoked with the real update message/options; no real updates, relay installation, cookie import, or tool approval ran.
Head recording: Enter confirms the opted-in update, cancels generic approval, and cancels destructive confirmation
Not verified: packaged Electron desktop, actual update execution from Settings/sidebar or remote batch, macOS, Windows, physical touch/soft keyboards, screen readers, iOS, or Android. Mobile uses its separate native dialogs. Synthetic Chromium touch tests verify popup focus; they do not verify OS keyboard behavior.
Implementation: Codex GPT-6.1 Sol; tests: Codex GPT-6 Astra; reviews: Claude Opus 5.5 and Codex GPT-6 Sol. Harness: T3 Code through Codex.